package demo1;

public class SingleHungry {
    private  static  SingleHungry instance=new SingleHungry();
    //构造方法私有化
    private SingleHungry(){}
    //提供一个对外获取的单例对象的方法
    public static SingleHungry get(){
        return instance;
    }
}
